export interface IForm {
  formItems: IFormItem[]
  labelWidth?: string
  colLayout: any
  itemStyle?: any
}
type IFormType = 'input' | 'password' | 'select' | 'datepicker'
export interface IFormItem {
  field: string
  type: IFormType
  label: string
  rules?: any[]
  placeholder?: any
  options?: any[]
  otherOptions?: any
}
export const formConfig: IForm = {
  labelWidth: '250px',
  colLayout: {
    span: 8
  },
  formItems: [
    {
      field: 'name',
      type: 'input',
      label: '角色名',
      rules: [],
      placeholder: '请输入角色名称'
    },
    {
      field: 'intro',
      type: 'input',
      label: '权限介绍',
      rules: [],
      placeholder: '请输入权限介绍'
    },
    {
      field: 'sings',
      type: 'select',
      label: '喜欢的歌',
      rules: [],
      placeholder: '请选择喜欢的歌',
      options: [
        { singer: '无条件', value: '当潮流爱新鲜,当旁人爱标签' },
        { singer: 'shall we talk', value: '就算牙关开始打震开始别说谎' },
        { singer: '岁月如歌', value: '如何不懂谦卑' }
      ]
    },
    {
      field: 'time',
      type: 'datepicker',
      label: '创建时间',
      rules: [],
      otherOptions: {
        startPlaceholder: '开始时间',
        endPlaceholder: '结束时间',
        type: 'daterange'
      }
    }
  ]
}
